<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>帮助类别</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="1164907264">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/manage/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/manage/js/jquery-1.7.1.min.js"></script>

	<script type="text/javascript" src="/manage/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/manage//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/manage/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/manage/css/define.css"/>
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "1164907264";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/manage/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/manage/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("helpcategory.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		THIS.setData(protocol.data);
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		if($("#content").size()>0){
			 //构造编辑页helpCategory.content为html编辑控件
			 KE.init({
				id : "content",
				width : "750px",height : "300px", 
				imageUploadJson : window["uploadUrl"]
			 });
			 KE.create("content");
		 }
		 
	$("#helpcategoryForm").form({
		"":function(){}
		,"helpCategory.id":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"helpCategory.sort":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"helpCategory.name":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "问题标题不能为空";
			}
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "问题标题最大长度为32个字符";
		}
		,"helpCategory.updateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"helpCategory.addTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"helpCategory.merchant":function(el){
		}
		,"helpCategory.content":function(el){
			if($("#content").get(0))
			 	KE.sync("content");		 
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>



<form lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'}}" class="form editform edittype_{{edittype}}" ref="HelpCategory" id="helpcategoryForm" name="helpcategoryForm" target="jsoniframe" action="helpcategory.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写帮助类别相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
	{{lz.set("id_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"id"))))}}
	{{lz.set("id_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$id}}
	<dl lz:if="{{id_editable||id_readonly}}" class="id hidden " major  ref="id">
		<dt>编　　号:</dt>
		<dd lz:if="{{id_editable}}" input="hidden">
			<lz:block lz:if="{{helpCategory$id}}">
				{{helpCategory$id}}
			</lz:block>
			<lz:block lz:if="{{!helpCategory$id}}">
			<input type="hidden" value="{{lz.htm(helpCategory.id)}}" name="helpCategory.id" id="id" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{id_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="id">{{helpCategory.id}}</textarea>
		 		<span>
		 	
			 {{lz.html(helpCategory.id$||helpCategory.id)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$id}}
	{{lz.set("sort_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"sort"))))}}
	{{lz.set("sort_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sort}}
	<dl lz:if="{{sort_editable||sort_readonly}}" class="ribs sort  " major  ref="sort">
		<dt>问题排序:</dt>
		<dd lz:if="{{sort_editable}}" input="number">
			<lz:block lz:if="{{helpCategory$sort}}">
				{{helpCategory$sort}}
			</lz:block>
			<lz:block lz:if="{{!helpCategory$sort}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="helpCategory.sort" id="sort"  value="{{lz.htm(helpCategory.sort)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>数字越小越排前面</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sort_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sort">{{helpCategory.sort}}</textarea>
		 		<span>
		 	
			 {{lz.html(helpCategory.sort$||helpCategory.sort)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sort}}
	{{lz.set("name_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"name"))))}}
	{{lz.set("name_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$name}}
	<dl lz:if="{{name_editable||name_readonly}}" class="name  " major  ref="name">
		<dt>问题标题:</dt>
		<dd lz:if="{{name_editable}}" input="text">
			<lz:block lz:if="{{helpCategory$name}}">
				{{helpCategory$name}}
			</lz:block>
			<lz:block lz:if="{{!helpCategory$name}}">
		 	<input type="text" class="input narrow"   name="helpCategory.name" id="name"  value="{{lz.htm(helpCategory.name)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入帮助类别的问题标题</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{name_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="name">{{helpCategory.name}}</textarea>
		 		<span>
		 	
			 {{lz.html(helpCategory.name$||helpCategory.name)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$name}}
	{{lz.set("updateTime_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"updateTime"))))}}
	{{lz.set("updateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$updateTime}}
	<dl lz:if="{{updateTime_editable||updateTime_readonly}}" class="updateTime  " major  ref="updateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{updateTime_editable}}" input="datetime">
			<lz:block lz:if="{{helpCategory$updateTime}}">
				{{helpCategory$updateTime}}
			</lz:block>
			<lz:block lz:if="{{!helpCategory$updateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="helpCategory.updateTime" id="updateTime"  value="{{helpCategory.updateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择帮助类别的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{updateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="updateTime">{{helpCategory.updateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(helpCategory.updateTime$||helpCategory.updateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$updateTime}}
	{{lz.set("addTime_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"addTime"))))}}
	{{lz.set("addTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$addTime}}
	<dl lz:if="{{addTime_editable||addTime_readonly}}" class="addTime  " major  ref="addTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{addTime_editable}}" input="datetime">
			<lz:block lz:if="{{helpCategory$addTime}}">
				{{helpCategory$addTime}}
			</lz:block>
			<lz:block lz:if="{{!helpCategory$addTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="helpCategory.addTime" id="addTime"  value="{{helpCategory.addTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择帮助类别的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{addTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="addTime">{{helpCategory.addTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(helpCategory.addTime$||helpCategory.addTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$addTime}}
	{{lz.set("content_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"content"))))}}
	{{lz.set("content_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$content}}
	<dl lz:if="{{content_editable||content_readonly}}" class="ribs content   wider" minor  ref="content">
		<dt>问题内容:</dt>
		<dd lz:if="{{content_editable}}" input="html">
			<lz:block lz:if="{{helpCategory$content}}">
				{{helpCategory$content}}
			</lz:block>
			<lz:block lz:if="{{!helpCategory$content}}">
		    <textarea class="input wide html"  id="content" name="helpCategory.content" style="height:300px;visibility:hidden;">{{helpCategory.content}}</textarea>
	 	 </lz:block>
	 	 
	 	 <em>请输入帮助类别的问题内容</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{content_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(helpCategory.content$||helpCategory.content)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$content}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{helpCategory.id}}" name="helpCategory.id" id="id" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'}}">
				<button class="button" type="submit">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="$.closeModalDialog();" type="button">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/setting/helpcategory.edit.html?edittype=update&id={{helpCategory.id}}"'>
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteHelpcategory('{{helpCategory.id}}','{{helpCategory.name}}')">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="$.closeModalDialog();" type="button">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>


 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>

</script>
</html>